﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace Esosi.Medical.Test
{
    internal class Program
    {
        [DllImport("SendRcv3.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
        public static extern string SendRcv2(String StartParam, string MsgSend, byte[] MsgRcv);

        private static void Main(string[] args)
        {
            try
            {
                byte[] MsgRcv = new byte[512];                                     //收集返回参数到byte[]中;
                string MsgSend = "abc";
                SendRcv2("12345678", MsgSend, MsgRcv);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
    }
}